/**
 * Copyright (c) 2013-2022, Alibaba Group Holding Limited;
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * </p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: TxnStream.proto

package com.aliyun.polardbx.binlog.protocol;

public interface TxnTokenOrBuilder extends
    // @@protoc_insertion_point(interface_extends:com.aliyun.polardbx.binlog.protocol.TxnToken)
    com.google.protobuf.MessageOrBuilder {

  /**
   * <code>string tso = 1;</code>
   * @return The tso.
   */
  java.lang.String getTso();
  /**
   * <code>string tso = 1;</code>
   * @return The bytes for tso.
   */
  com.google.protobuf.ByteString
      getTsoBytes();

  /**
   * <code>int64 txnId = 2;</code>
   * @return The txnId.
   */
  long getTxnId();

  /**
   * <code>string partitionId = 3;</code>
   * @return The partitionId.
   */
  java.lang.String getPartitionId();
  /**
   * <code>string partitionId = 3;</code>
   * @return The bytes for partitionId.
   */
  com.google.protobuf.ByteString
      getPartitionIdBytes();

  /**
   * <code>string originMergeSourceId = 4;</code>
   * @return The originMergeSourceId.
   */
  java.lang.String getOriginMergeSourceId();
  /**
   * <code>string originMergeSourceId = 4;</code>
   * @return The bytes for originMergeSourceId.
   */
  com.google.protobuf.ByteString
      getOriginMergeSourceIdBytes();

  /**
   * <code>.com.aliyun.polardbx.binlog.protocol.TxnType type = 5;</code>
   * @return The enum numeric value on the wire for type.
   */
  int getTypeValue();
  /**
   * <code>.com.aliyun.polardbx.binlog.protocol.TxnType type = 5;</code>
   * @return The type.
   */
  com.aliyun.polardbx.binlog.protocol.TxnType getType();

  /**
   * <code>bool xaTxn = 6;</code>
   * @return The xaTxn.
   */
  boolean getXaTxn();

  /**
   * <pre>
   **
   *标识是否为Tso事务。虽然【Tso事务】和【NoTso事务】的Token都有tso字段，
   *但是【NoTso事务】的tso是根据其前序【Tso事务】的真实tso生成的虚拟tso
   * </pre>
   *
   * <code>bool tsoTransaction = 7;</code>
   * @return The tsoTransaction.
   */
  boolean getTsoTransaction();

  /**
   * <pre>
   **
   *该事务下的所有LogEvent的个数，注意：不是某个批次的的个数
   * </pre>
   *
   * <code>int32 txnSize = 8;</code>
   * @return The txnSize.
   */
  int getTxnSize();

  /**
   * <pre>
   **
   *1.dumper生成事务的begin头时使用
   *2.ddl场景下标识ddl sql对应的库名
   * </pre>
   *
   * <code>string schema = 9;</code>
   * @return The schema.
   */
  java.lang.String getSchema();
  /**
   * <pre>
   **
   *1.dumper生成事务的begin头时使用
   *2.ddl场景下标识ddl sql对应的库名
   * </pre>
   *
   * <code>string schema = 9;</code>
   * @return The bytes for schema.
   */
  com.google.protobuf.ByteString
      getSchemaBytes();

  /**
   * <pre>
   **
   *该事务的所有参与者
   * </pre>
   *
   * <code>repeated string allParties = 10;</code>
   * @return A list containing the allParties.
   */
  java.util.List<java.lang.String>
      getAllPartiesList();
  /**
   * <pre>
   **
   *该事务的所有参与者
   * </pre>
   *
   * <code>repeated string allParties = 10;</code>
   * @return The count of allParties.
   */
  int getAllPartiesCount();
  /**
   * <pre>
   **
   *该事务的所有参与者
   * </pre>
   *
   * <code>repeated string allParties = 10;</code>
   * @param index The index of the element to return.
   * @return The allParties at the given index.
   */
  java.lang.String getAllParties(int index);
  /**
   * <pre>
   **
   *该事务的所有参与者
   * </pre>
   *
   * <code>repeated string allParties = 10;</code>
   * @param index The index of the value to return.
   * @return The bytes of the allParties at the given index.
   */
  com.google.protobuf.ByteString
      getAllPartiesBytes(int index);

  /**
   * <pre>
   **
   *一些特殊的TxnToken，没有TxnItem的概念，此时通过payload字段传输数据
   * </pre>
   *
   * <code>bytes payload = 11;</code>
   * @return The payload.
   */
  com.google.protobuf.ByteString getPayload();

  /**
   * <pre>
   **
   *Tso事务专用
   * </pre>
   *
   * <code>int64 snapshotSeq = 12;</code>
   * @return The snapshotSeq.
   */
  long getSnapshotSeq();

  /**
   * <pre>
   **
   *表名，非必须
   * </pre>
   *
   * <code>string table = 13;</code>
   * @return The table.
   */
  java.lang.String getTable();
  /**
   * <pre>
   **
   *表名，非必须
   * </pre>
   *
   * <code>string table = 13;</code>
   * @return The bytes for table.
   */
  com.google.protobuf.ByteString
      getTableBytes();

  /**
   * <pre>
   **
   *使用Wrapper类型，解决兼容性问题，因为serverId可以设置为0
   * </pre>
   *
   * <code>.google.protobuf.Int64Value serverId = 14;</code>
   * @return Whether the serverId field is set.
   */
  boolean hasServerId();
  /**
   * <pre>
   **
   *使用Wrapper类型，解决兼容性问题，因为serverId可以设置为0
   * </pre>
   *
   * <code>.google.protobuf.Int64Value serverId = 14;</code>
   * @return The serverId.
   */
  com.google.protobuf.Int64Value getServerId();
  /**
   * <pre>
   **
   *使用Wrapper类型，解决兼容性问题，因为serverId可以设置为0
   * </pre>
   *
   * <code>.google.protobuf.Int64Value serverId = 14;</code>
   */
  com.google.protobuf.Int64ValueOrBuilder getServerIdOrBuilder();

  /**
   * <code>string ddl = 15;</code>
   * @return The ddl.
   */
  java.lang.String getDdl();
  /**
   * <code>string ddl = 15;</code>
   * @return The bytes for ddl.
   */
  com.google.protobuf.ByteString
      getDdlBytes();

  /**
   * <code>int32 ddlScope = 16;</code>
   * @return The ddlScope.
   */
  int getDdlScope();
}
